
  <div class="x_panel">
    <div class="x_content" style="display: block;">
      <!--表格主体内容-->
      <div class="nav navbar-right panel_toolbox">
        <a class="fa fa-plus" href="/adv/add.html"> 添加</a>
      </div>
      <br>
      <div class="row-fluid">
        <form action="/adv/index.html" method="get">
          <label class="control-label">广告标题</label>
          <input type="text" class="form-control-new" name="form[adv_title]" value="{if isset($query.adv_title)}{$query.adv_title}{/if}">
          <label class="control-label">状态</label>
          <select  class="form-control-new" name="form[adv_status]">
            <option value="2" {if isset($query.adv_status) && $query.adv_status==2}selected="selected"{/if}>全部</option>
            <option value="0" {if isset($query.adv_status) && $query.adv_status==0}selected="selected"{/if}>停用</option>
            <option value="1" {if isset($query.adv_status) && $query.adv_status==1}selected="selected"{/if}>启用</option>
          </select>
          <button type="submit" class="btn btn-primary" >搜索</button>
        </form>
      </div>
      <br>
      <div class="cont">
        <table class="table table-bordered table-striped">
          <thead>
          <tr>
            <th width="100px">ID</th>
            <th>广告标题</th>
            <th>投放位置</th>
            <th>状态</th>
            <th>排序</th>
            <th>开始时间</th>
            <th>结束时间</th>
            <th>创建时间</th>
            <th>操作</th>
          </tr>
          </thead>
          <tbody>
          {foreach $adv.lists as $advitem}
          <tr>
            <td>{$advitem.adv_id}</td>
            <td>{$advitem.adv_title}</td>
            <td>{if $advitem.adv_position==0}首页{/if}</td>
            <td>{if $advitem.adv_status==1}启用{else}停用{/if}</td>
            <td>{$advitem.adv_sort}</td>
            <td>{$advitem.start_time}</td>
            <td>{$advitem.end_time}</td>
            <td>{$advitem.add_time}</td>
            <td>
              <div class="x_content">
                <a class="btn btn-primary btn-xs" href="{eval U(['adv/edit','adv_id'=>$advitem.adv_id])}"> 编辑</a>
                <button class="btn btn-danger btn-xs" data-toggle="dropdown">删除
                  <i class="icon-angle-down"></i></button>
                <ul class="dropdown-menu">
                  <li><a href="{eval U(['adv/delete','adv_id'=>$advitem.adv_id])}">确定</a></li>
                  <li><a href="javascript:;">取消</a></li>
                </ul>
              </div>
            </td>
          </tr>
          {/foreach}
          </tbody>
        </table>
        <!--分页-->

        {Yii::$app->view->render('/com/pager.php',['pager'=>$adv['pager']])}
      </div>
    </div>
  </div>

